import java.util.Scanner;

public class Exer3_8_15 {
    public static void main(String[] args) {
        Scanner input =new Scanner(System.in);
        System.out.println("请输入一个数：");
        int j=input.nextInt();
        for(int i=2;i<j/2;i++){
            if (j%i==0){
                System.out.println(j+"不是质数");
                break;
            }else if(j==i){
                System.out.println(j+"是质数");
            }
        }
    }
}
